package com.dxy.elasticsearch.entity;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * @Description 职位详情
 * @Author dangxianyue
 * @Date 2022/12/30 14:47
 */
@Setter
@Getter
public class JobDetail {

    @JSONField(serialize = false)
    @ApiModelProperty("职位id")
    @NotNull(message = "职位id不能为空！")
    private Long id;

    @ApiModelProperty("职位所在区域")
    private String area;

    @ApiModelProperty("岗位要求的工作经验")
    private String exp;

    @ApiModelProperty("学历要求")
    private String edu;

    @ApiModelProperty("薪资范围")
    private String salary;

    @JSONField(name = "job_type")
    @ApiModelProperty("职位类型（全职/兼职/实习）")
    private String jobType;

    @ApiModelProperty("公司名")
    private String cmp;

    @ApiModelProperty("浏览量")
    private String pv;

    @ApiModelProperty("岗位名称")
    private String title;

    @ApiModelProperty("职位描述")
    private String jd;

    @Override
    public String toString() {
        return id + ":" + JSONObject.toJSONString(this);
    }
}
